//
//  LocalFileViewController.m
//  JXW_UnionSDK
//
//  Created by 彭月辉 on 2022/6/24.
//

#import "LocalFileViewController.h"
#import "LocalFileListViewController.h"

@interface LocalFileViewController (){
    NSArray *array;
}

@end

@implementation LocalFileViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"本地文件";
    self.view.backgroundColor = [UIColor whiteColor];
    self.tableView.tableFooterView = [UIView new];

    array = @[@"照片",@"录像",@"紧急录像"];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [array count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellmark"];
    if(!cell){
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cellmark"];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;;
    }
    cell.textLabel.text = array[indexPath.row];
    return cell;
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    LocalFileListViewController *listVC = [[LocalFileListViewController alloc] init];
    listVC.type = indexPath.row;
    [self.navigationController pushViewController:listVC animated:YES];

}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 60;
}



@end
